<template>
  <div class="">
    <p>name is {{ name }} age is {{ age }}</p>
  </div>
</template>

<script setup>
import { ref, toRefs } from 'vue'
const person = ref({
  name: 'zhangsan',
  age: 30
})

// toRefs了解可以，用得比较少
const { name, age } = toRefs(person.value)
console.log(name, age)
</script>

<style scoped></style>
